package com.example.rest.websocket;

import com.example.base.websocket.AppWebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;


@Slf4j
public class WebSocket extends AppWebSocket {

    @Override
    public void handlerTextMessage(WebSocketSession session, TextMessage message) {
        log.info("appName: {}",this.getApp());
        log.info("appName {} 收到消息:{}",this.getApp(),message.getPayload());
    }

    @Override
    public void initExecute() {
        log.info("websocket 执行初始化了 ");
        BaseAppWebSocketUtils.setAppWebSocket(this);
    }


}
